package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.ContractPayMethod;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/ContractPayMethodMapper.class */
public interface ContractPayMethodMapper {
    @Select({"select * from contract_pay_method  where contractpay_id=#{contractPayId} and contractpay_section=#{contractPaySection} order by contractpay_section "})
    @Results(id = "ContractPayMethod1", value = {@Result(property = "id", column = "id"), @Result(property = "contractPayId", column = "contractpay_id"), @Result(property = "contractPaySection", column = "contractpay_section"), @Result(property = "contractPayNum", column = "contractpay_num"), @Result(property = "contractPayMoney", column = "contractpay_money"), @Result(property = "contractpayPercentage", column = "contractpay_percentage")})
    List<ContractPayMethod> findByProjectAndSection(@Param("contractPayId") String str, @Param("contractPaySection") Integer num);

    @Select({"select * from contract_pay_method  where contractpay_id=#{contractPayId} and contractpay_section=#{contractPaySection} and contractpay_num = #{num} order by contractpay_section "})
    @Results(id = "ContractPayMethod", value = {@Result(property = "id", column = "id"), @Result(property = "contractPayId", column = "contractpay_id"), @Result(property = "contractPaySection", column = "contractpay_section"), @Result(property = "contractPayNum", column = "contractpay_num"), @Result(property = "contractPayMoney", column = "contractpay_money"), @Result(property = "contractpayPercentage", column = "contractpay_percentage")})
    ContractPayMethod findByProjectAndSectionAndNum(@Param("contractPayId") String str, @Param("contractPaySection") Integer num, @Param("num") Integer num2);

    @Insert({"insert into contract_pay_method (contractpay_id,contractpay_section,contractpay_num,contractpay_money,contractpay_percentage) values (#{contractPayId},#{contractPaySection},#{contractPayNum},#{contractPayMoney},#{contractpayPercentage})"})
    Integer add(ContractPayMethod contractPayMethod);

    @Update({"update contract_pay_method set contractpay_id=#{contractPayId},contractpay_section=#{contractPaySection},contractpay_num=#{contractPayNum},contractpay_money=#{contractPayMoney},contractpay_percentage=#{contractpayPercentage} where id=#{id}"})
    Integer update(ContractPayMethod contractPayMethod);

    @Delete({"delete from contract_pay_method where id=#{id}"})
    Integer remove(int i);

    @Delete({"delete from contract_pay_method where contractpay_section=#{contractpaySection}"})
    Integer delete(int i);
}